//
//  QingJiaDetail.m
//  ChatDemo-UI2.0
//
//  Created by syun on 16/3/22.
//  Copyright © 2016年 syun. All rights reserved.
//

#import "QingJiaDetail.h"

@implementation QingJiaDetail
-(id)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        [self loadView];
    }
    return self;
}
-(void)loadView
{
    UILabel *label1=[[UILabel alloc]initWithFrame:CGRectMake(10, 10, 100, 25)];
    label1.text=@"班级";
    [self addSubview:label1];
    
    UIButton *btn1=[UIButton buttonWithType:UIButtonTypeCustom];
    btn1.frame=CGRectMake(label1.frame.origin.x+label1.frame.size.width, label1.frame.origin.y, self.frame.size.width-label1.frame.origin.x-label1.frame.size.width-10, 25);
    btn1.backgroundColor=[UIColor whiteColor];
    [self addSubview:btn1];
    
    UILabel *label2=[[UILabel alloc]initWithFrame:CGRectMake(10, label1.frame.origin.y+label1.frame.size.height+5, 100, 25)];
    label2.text=@"开始时间";
    [self addSubview:label2];
    
    UIButton *btn2=[UIButton buttonWithType:UIButtonTypeCustom];
    btn2.frame=CGRectMake(label1.frame.origin.x+label1.frame.size.width, label2.frame.origin.y, self.frame.size.width-label1.frame.origin.x-label1.frame.size.width-10, 25);
    btn2.backgroundColor=[UIColor whiteColor];
    [self addSubview:btn2];
    
    UILabel *label3=[[UILabel alloc]initWithFrame:CGRectMake(10, label2.frame.origin.y+label2.frame.size.height+5, 100, 25)];
    label3.text=@"结束时间";
    [self addSubview:label3];
    
    UIButton *btn3=[UIButton buttonWithType:UIButtonTypeCustom];
    btn3.frame=CGRectMake(label1.frame.origin.x+label1.frame.size.width, label3.frame.origin.y, self.frame.size.width-label1.frame.origin.x-label1.frame.size.width-10, 25);
    btn3.backgroundColor=[UIColor whiteColor];
    [self addSubview:btn3];
    
    UILabel *label4=[[UILabel alloc]initWithFrame:CGRectMake(10, label3.frame.origin.y+label3.frame.size.height+5, 100, 25)];
    label4.text=@"请假类型";
    [self addSubview:label4];
    
    UIButton *btn4=[UIButton buttonWithType:UIButtonTypeCustom];
    btn4.frame=CGRectMake(label1.frame.origin.x+label1.frame.size.width, label4.frame.origin.y, self.frame.size.width-label1.frame.origin.x-label1.frame.size.width-10, 25);
    btn4.backgroundColor=[UIColor whiteColor];
    [self addSubview:btn4];
    
    UILabel *label5=[[UILabel alloc]initWithFrame:CGRectMake(10, label4.frame.origin.y+label4.frame.size.height+5, 100, 25)];
    label5.text=@"说明";
    [self addSubview:label5];
    
    UITextField *infoTxt=[[UITextField alloc]initWithFrame:CGRectMake(10, label5.frame.origin.y+label5.frame.size.height+5, self.frame.size.width-20, 80)];
    infoTxt.backgroundColor=[UIColor whiteColor];
    [self addSubview:infoTxt];
    
    UIButton *sureBtn=[UIButton buttonWithType:UIButtonTypeCustom];
    sureBtn.frame=CGRectMake(20, infoTxt.frame.origin.y+infoTxt.frame.size.height+20, self.frame.size.width-40, 50);
    [sureBtn setBackgroundColor:RGBACOLOR(0, 180, 255, 1)];
    [sureBtn setTitle:@"提交" forState:UIControlStateNormal];
    [self addSubview:sureBtn];
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
